<?php

class AcctYearTable extends Doctrine_Table
{
    public function getCurrentAcctYear(AcctSet $acct_set) {
        //$q = Doctrine_Query::create()->from("AcctYear")
        $q = $this->createQuery()
                ->where("AcctYear.acct_set_id = ?", $acct_set->getId())
                ->addWhere("AcctYear.is_closed = ?",  0);
        
        return $q->fetchOne();
    }
}
